home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 11
/
CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso
/
s
/
copypages.pprx
< prev
next >
Wrap
Text File
|
1992-03-14
|
1KB
|
46 lines
/*
@BCopyPages @P@ICopyright Gold Disk Inc., February, 1992
Make any number of copies of a range of pages.
*/
cr = '0a'x
call SafeEndEdit.rexx()
last = ppm_DocLastPage()
first = ppm_DocFirstPage()
cpage = ppm_CurrentPage()
if cpage = 0 then exit_msg("Please create a page before running this Genie.")
form = "From:"first'0a'x"To:"last'0a'x"Num copies:"1
form = ppm_GetForm("Enter Range Of Pages", 5, form)
if form = '' then call exit_msg()
parse var form from '0a'x topage '0a'x numcopies
if ~(datatype(from, n) & datatype(topage, n) & datatype(numcopies, n)) then
exit_msg('Invalid Input')
if from < first | from > last | topage < first | topage > last then
exit_msg('Invalid Input')
call ppm_AutoUpdate(0)
endpage = topage + 1
do n = 1 to numcopies
do i = from to topage
call ppm_CopyPage(i, endpage, 1)
endpage = endpage + 1
end
end
exit_msg("Done")
exit_msg: procedure expose cpage
do
parse arg message
if message ~= '' then call ppm_Inform(1, message,)
call ppm_GotoPage(cpage)
call ppm_AutoUpdate(1)
exit
end